package com.Shoping.service.impl;

import com.Shoping.dao.ColorDao;
import com.Shoping.dao.impl.ColorDaoImpl;
import com.Shoping.entity.Color;
import com.Shoping.service.ColorService;

import java.sql.SQLException;
import java.util.List;

public class ColorServiceImpl implements ColorService {
    private ColorDao colorDao = new ColorDaoImpl();
    @Override
    public void modifyColorByCmId(Integer cmId) throws SQLException {
        colorDao.modifyColorByCmId(cmId);
    }

    @Override
    public List<Color> selectByCmId(Integer cmId) throws SQLException {
        return colorDao.selectByCmId(cmId);
    }

    @Override
    public void updateColor(Integer cId0, String cName0, Double cNumber0) throws SQLException {
        colorDao.updateColor(cId0,cName0,cNumber0);
    }

    @Override
    public void addColor(Integer cmId, String cName, Integer cNumber0) throws SQLException {
        colorDao.addColor(cmId,cName,cNumber0);
    }
}
